<template>
  <div>
    <button @click="emitEvent">触发事件</button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data() {
    return {
      name: "zx",
      age: 8
    }
  },
  methods: {
    emitEvent() {
      this.bus.$emit("show",this.name,this.age)
      this.bus.$emit("add",this.name,this.age)
    }
  }
}
</script>

<style scoped></style>
